home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / gsipar3x.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  2.7 KB  |  71 lines

  1. /* Copyright (C) 2000 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: gsipar3x.h,v 1.3 2000/09/19 19:00:29 lpd Exp $ */
  20. /* Extended ImageType 3 ("3x") image parameter definition */
  21.  
  22. #ifndef gsipar3x_INCLUDED
  23. #  define gsipar3x_INCLUDED
  24.  
  25. #include "gsiparam.h"
  26. #include "gsiparm3.h"        /* for interleave types */
  27.  
  28. /*
  29.  * An ImageType 3x image is the transparency-capable extension of an
  30.  * ImageType 3 image.  Instead of a MaskDict, it has an OpacityMaskDict
  31.  * and/or a ShapeMaskDict, whose depths may be greater than 1.  It also
  32.  * has an optional Matte member, defining a pre-mixed background color.
  33.  *
  34.  * Since ImageTypes must be numeric, we assign the number 103 for this
  35.  * type of image; however, this is defined in only one place, namely here.
  36.  */
  37. #define IMAGE3X_IMAGETYPE 103
  38.  
  39. /*
  40.  * If InterleaveType is 3, the data source(s) for the mask(s) *precede* the
  41.  * data sources for the pixel data, with opacity preceding shape.  For
  42.  * InterleaveType 3, the client is responsible for always providing mask
  43.  * data before the pixel data that it masks.  (The implementation does not
  44.  * currently check this, but it should.)  For this type of image,
  45.  * InterleaveType 2 (interleaved scan lines) is not allowed.
  46.  */
  47. typedef struct gs_image3x_mask_s {
  48.     int InterleaveType;
  49.     float Matte[GS_CLIENT_COLOR_MAX_COMPONENTS];
  50.     bool has_Matte;
  51.     /* Note that the ColorSpaces in the MaskDicts are ignored. */
  52.     gs_data_image_t MaskDict;
  53. } gs_image3x_mask_t;
  54. typedef struct gs_image3x_s {
  55.     gs_pixel_image_common;    /* DataDict */
  56.     gs_image3x_mask_t Opacity, Shape; /* ...MaskDict */
  57. } gs_image3x_t;
  58.  
  59. /* As noted above, the ColorSpaces in the MaskDicts are ignored. */
  60. #define private_st_gs_image3x()    /* in gximag3x.c */\
  61.   gs_private_st_suffix_add0(st_gs_image3x, gs_image3x_t, "gs_image3x_t",\
  62.     image3x_enum_ptrs, image3x_reloc_ptrs, st_gs_pixel_image)
  63.  
  64. /*
  65.  * Initialize an ImageType 3x image.
  66.  */
  67. void gs_image3x_t_init(P2(gs_image3x_t *pim,
  68.               const gs_color_space *color_space));
  69.  
  70. #endif /* gsipar3x_INCLUDED */
  71.